Permission is hereby granted to use and redistribute this software at no charge, provided that the software is only distributed in its original unmodified format, accompanied by this documentation.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE COPYRIGHT HOLDER SHALL NOT BE HELD LIABLE FOR ANY DAMAGES WHATSOEVER ARISING FROM THE USE OF, MISUSE OF, OR INABILITY TO USE THIS SOFTWARE.
I wrote BlackWatch because none of the screen savers which were available at the time did just what I wanted. Feature-packed screen savers tend to want plenty of RAM, CPU cycles, and disk space, and they patch a lot of operating system routines in order to work. On the other end, bare-bones screen savers don't provide the ability to securely lock your screen with password protection. Also, most screen savers of both types are implemented as system extensions, so you have to reboot your machine to run them or to get rid of them. That isn't optimal if you want to install a screen saver on a networked Macintosh which is busy acting as a server. BlackWatch solves these problems. It's small, quick, simple, compatible, and it's free.
BlackWatch will run on any Macintosh, Power Macintosh, or Mac-compatible computer which is capable of running System 7.0 or greater. This includes the Macintosh Plus and later machines.
BlackWatch will run in as little as 64K of RAM (a partition of 128K or more is recommended).
BlackWatch is a standard Macintosh application. Just double-click to run it, then leave it running in the background while you work on other things.
You will probably want to put the BlackWatch application (or an alias to it) in the Startup Items folder. This will cause BlackWatch to run automatically whenever you restart your computer. If you are running Mac OS 8.5 or later, you can simply drag BlackWatch onto the System Folder icon, and it will automatically be put into the Startup Items folder for you. An option in the Preferences dialog lets you choose whether the Finder is brought to the front after BlackWatch launches.
After 5 minutes of inactivity (or whatever idle interval you specify), BlackWatch will fade the screen, and optionally display a simple clock to provide visual feedback that the computer is on and running. The clock is redisplayed at a random location every 5 seconds (or another movement interval you specify.) Moving the mouse, inserting a disk, or typing any key will restore the screen. If you don't want the screen saver waking up each time your mouse gets bumped slightly, another Preferences option lets you tell BlackWatch to wake up only when the mouse is clicked.
You can fade the screen immediately by moving the mouse into one corner of your main screen, or prevent the screen from fading by placing the mouse in another corner. The Preferences dialog lets you specify which corners to use (or whether to use special corners at all.)
If you have an active matrix LCD screen, you may want to select the "Use white background" option for more efficient screen saving.
For security, you can specify a password (up to 255 characters in length) that will be required to unlock your screen. On PowerPC-based machines with the Keychain Manager (Mac OS 9.0 or later), you can alternately choose to unlock your keychain instead of entering the BlackWatch password.
When a password is set and BlackWatch is activated, the debugger and force-quit entry points are temporarily disabled to prevent unauthorized access. This level of security lets you walk away from your desk knowing that an intruder would need to reboot your machine in order to gain access, and therefore would not be able to view or use applications and services you may currently be logged into, such as file servers, databases, or personal e-mail. BlackWatch does NOT prevent someone from restarting your machine; it simply provides a deterrent to casual snooping while you're away from your desk.
Select the "Preferences..." item in the Edit menu to bring up the Preferences dialog. The On and Off radio buttons control whether automatic screen saving is enabled or disabled. You can select different categories of settings from the pop-up menu at the top of this dialog. Each category and its available options are described below:
Sleeping
• Idle interval
Specify the time, in minutes, after which BlackWatch should automatically fade the screen if there has been no user activity.
• Special corners
These options appear as miniature screen icons, with a dark triangle indicating the currently selected corner. To select a different corner, simply click in that corner of the icon. Note that the "Fade Now" and "Never Fade" corners can't be the same; if your choice conflicts with the other corner, an adjacent corner is automatically selected. When the mouse is placed in the designated "Fade Now" corner on your main monitor (and remains there for at least 1 second), BlackWatch will activate and fade the screen. If the mouse is placed in the "Never Fade" corner and remains there, Black Watch will never fade the screen. Special corners are ignored if the "Special Corners" checkbox is not checked.
• Fade immediately when the system sleeps
If this box is checked, BlackWatch will activate and fade the screen when the system goes to sleep. System sleep can occur automatically at scheduled intervals (as set in the Energy Saver control panel), or manually (by selecting Sleep from the Finder's Special menu, or by closing the lid of a PowerBook.) This is useful in conjunction with the "Require password to unlock screen" option, described later in the Security section.
Display
• Draw clock
If this box is checked, BlackWatch draws a clock (of the style selected in the adjacent Style pop-up menu) when sleeping. Otherwise, it will simply fade the screen to black. BlackWatch will attempt to use the "gamma fade" technique to dim the screen, if the monitor supports it and no password is required to wake up.
You can choose whether the clock's second hand is displayed, and whether to draw graduations (tick marks) on the clock's dial. Other options are available, depending on the particular clock style that you select.
The Timer clock features the ability to count down to a specified date. To change this date, click the "Set Event Date..." button and type in the new date. You can enter the date in a wide variety of formats, including "January 1, 2001," "1 Jan 2001," "1/1/2001," "01-01-01," "1 2001 jan," and so on.
• Font
This pop-up menu lets you select the font used when drawing digital clocks. (NOTE: not all fonts work well for a digital clock! Some fonts have variable-width digits, which may cause the clock to jump or flicker excessively when seconds are displayed. If this occurs, try selecting a different font.)
• Size
This sliding control lets you adjust the size of the clock. Move the slider to the right to make the clock larger.
• Movement
This sliding control lets you adjust how often the clock is repositioned on the screen.
Security
• Require password to unlock screen
If this box is checked and a password has been specified, you will need to type that password to unlock the screen after sleeping. Checking this box will ask you to set a password if one doesn't already exist. Click the "Set Password..." button to specify your password, or to change the existing password. Your password is remembered if you uncheck the box, so you don't have to re-specify it later. To clear the password entirely, you can throw away the BlackWatch Preferences file (located in the Preferences folder in the System Folder).
• Unlock keychain to unlock screen (PowerPC and Mac OS 9.0 or later only)
If this box is checked, you will need to type in your keychain password (instead of the BlackWatch password) to unlock the screen after sleeping. You may want to use this option if you don't want to use (or remember) a separate password for BlackWatch.
• Lock keychain when going to sleep (PowerPC and Mac OS 9.0 or later only)
If this box is checked, all unlocked keychains will be automatically locked when sleeping.
• Require password to edit preferences
If this box is checked and a password has been specified, you will need to type that password to open the Preferences dialog.
Options
• Dismiss alerts automatically
If this box is checked, BlackWatch will attempt to dismiss any alert windows which come up in the frontmost layer while the screen is being saved. Typical examples are alerts which tell you that a file server has shut down, or you've dropped a modem connection. When BlackWatch detects an alert window being updated, it will simulate pressing the Return key to close the alert.
• Wake up if mouse moves
If this box is checked, BlackWatch will wake up when you move the mouse (or click the mouse, hit a key, or insert a disk.) Unchecking the box causes BlackWatch to ignore mouse movement; all other events will still wake the screen saver. You might want to uncheck this box if you find yourself accidentally waking up the screen saver by jostling the mouse, and that sort of thing bothers you.
• Use white background
If this box is checked, the screen will be cleared to white instead of black. This option is useful if your Macintosh has an active matrix LCD screen, where setting a pixel to white turns it off and conserves power. (Refer to the following articles in the Apple Tech Info Library for more details on this subject.)
NOTE: article 10639 incorrectly states that screen savers prevent a PowerBook or iBook from going to sleep. This is not the case when using BlackWatch.
• Enable Command-Q to Quit
If this box is checked, the command-key equivalent for the Quit menu item is enabled. You might want to uncheck this box if you find yourself accidentally quitting BlackWatch instead of the application you really wanted to quit.
• Bring Finder to front at startup
If this box is checked, BlackWatch will put itself into the background and make the Finder the active application when it is launched. This option helps make BlackWatch a little less obtrusive, while still keeping it readily available from the process menu.
• Fade screen immediately at startup
If this box is checked, BlackWatch will immediately fade the screen when it is launched. By selecting this option and requiring a password to wake up, you can lock your Mac's screen simply by double-clicking BlackWatch.
Two reasons. The first reason is simplicity. Applications are visible in the process menu when they're running, and they have a "Quit" menu item to make them go away cleanly. If this were implemented as a system extension or "background-only" process, the expectation that you would need to reboot your machine to run it or get rid of it is automatically set, even if that isn't technically required. It would require a separate application or control panel to launch or quit the background process and to change preference settings, causing potential confusion: the program could still be running in memory even after quitting its user interface component.
Second reason: compatibility. Background-only processes are not supposed to own windows or do any drawing. It's technically possible to use the Text Services Manager to create a window and get around this restriction, but event handling becomes much more complex, with increased compatibility risks. It's also possible to have the background-only process launch a separate foreground process when it's time to sleep, an approach which seems unnecessarily CPU-intensive and prone to failure in low-memory situations. The fewer components involved, the lower the potential for conflicts.
Where are the clock pictures stored? I want to display my own picture instead.
For most clock styles, individual components are drawn as needed using QuickDraw primitives instead of pictures. This requires less memory and helps to make things fast. If you absolutely, positively must display a different picture, you can add a file named "BlackWatch Custom Resources" to your Preferences folder. This file should contain a PICT resource with ID=1000 (for color displays) and/or ID=1001 (for black & white displays). Relaunch BlackWatch and select the "Mac OS" clock style to use the new picture. It's important to note that your replacement PICT resource must fit entirely in memory, so you will likely need to increase BlackWatch's memory partition if your PICT is larger than the one it replaces.
This program has been tested in daily use on many different machines over the last several years, but no software is ever completely free of bugs. If you encounter a problem, here are some things to try:
- Increase the memory partition. (This is done by selecting the BlackWatch application icon in the Finder, choosing "Get Info" from the File menu, and changing the values in the "Memory Requirements" box.) The default minimum size works well under almost all conditions; however, it doesn't leave much free space, and certain system calls occasionally require more memory. Try setting the preferred size to at least 256K if you have a significant number of third-party system extensions and fonts installed. This usually eliminates any problems caused by a shortage of memory.
- If a file named "BlackWatch Custom Resources" is present in the Preferences folder, move it to a different folder and restart the BlackWatch application. This file contains customized resources, usually for displaying a special graphic or message in the Password dialog box, as required by schools and institutions. Use of a custom resource file may require a larger memory partition (refer to the previous paragraph.)
- Make sure another screen saver isn't active. Energy Saver, a control panel which is part of the system software, is turned on by default and may also put your screen (or entire system) to sleep unless you explicitly turn it off. You may want to use Energy Saver in conjunction with BlackWatch to combine password security and monitor energy-saving features.
- Try restarting with only Apple extensions loaded, and see if the problem can still be reproduced or if it can be narrowed down to a conflict with a particular extension. You can use the "Extensions Manager" control panel to turn extensions and control panels on or off.
- Let me know about it. When reporting a bug, please be sure to include information about your system (model of computer, version of Mac OS, and so on), as well as the version of BlackWatch you're using. If you're familiar with Macsbug, the output of a 'stdlog' command is also very useful information to help me diagnose the problem.
If you use the "Scheduled Shutdown" feature of the Energy Saver control panel, you may have noticed that Energy Saver displays an alert when the system is about to shut down. The default button in this alert tells Energy Saver to wait 5 minutes before shutting down. When BlackWatch's automatic alert dismissal feature is active, it dutifully presses this button every 5 minutes and system shutdown is thus postponed forever. To avoid this situation, make sure to uncheck the "Dismiss alerts automatically" option in the Preferences dialog if you plan to use Energy Saver to shut down your machine.
Retrospect, and other applications launched while BlackWatch is sleeping
If you use Retrospect (by Dantz Development) and want to script an unattended backup operation, there is one important workaround to note when using BlackWatch on your server. You will need to leave the Retrospect application running (it must already be running before BlackWatch goes to sleep.) If your scheduled backup is to occur more than once, you will also need to ensure that Retrospect doesn't quit after running a script. Retrospect's Preferences panel has an option (in "Unattended Options") to "Stay in Retrospect" when a script completes execution.
Keeping the Retrospect application running is necessary because it can't be launched while BlackWatch is sleeping. The Finder will defer launching a foreground application whenever a modal dialog window (including the one that BlackWatch displays when sleeping) is in the frontmost layer. Generally this behavior is a good thing, since you don't want other windows unexpectedly popping up in front of BlackWatch's window when the screen is being saved. However, it's a problem if you are running applications that want to launch themselves automatically into the foreground at a scheduled interval. This problem does not affect Retrospect Remote, since it isn't an application. It also does not affect processes which are launched into the background, such as web server CGIs and the vast majority of server applications.
NOTE: A patch for Retrospect (version 4.0 through 4.3) is available which allows it to launch in the background, making the workaround described above unnecessary. Check the Extras folder in the BlackWatch folder for a link to a download site.
Applications which use floating palette windows
Several applications (I'm told these have included ICQ and OneClick) may display floating windows which do not go away when BlackWatch goes to sleep. As a point of comparison, the Control Strip is a floating window which does hide itself once the menu bar is hidden.
Mac OS X
BlackWatch currently runs in the Classic environment and co-exists with native OS X applications, but since the underlying system architecture is radically different, it's not possible for BlackWatch to detect cursor movement or any user activity outside of the Classic environment. The Carbon API currently does not provide a way to determine system-wide user activity. There are also certain differences in OS X which prevent the effective use of BlackWatch as a screen locker. To run properly under OS X, BlackWatch 2.0 will most likely need to be redesigned as a native “Cocoa” application.
I'm continuing to investigate these issues, and hope to resolve them in future versions.
Apple, the Apple logo, Macintosh, Power Macintosh, Mac OS and QuickTime are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. PowerPC is a registered trademark of International Business Machines Corporation.